
{% extends "base.html" %}

{% block nav %}
<li class="active">
    <i class="fa fa-user"></i> 报表查询
</li>
{% endblock %}

{% block content %}
	<div class="col-lg-12">
		<div id='message'  style="display:none;">
			出问题了
		</div>
		<div class="col-lg-8">
			<div class="panel panel-default ">
				<div class="panel-heading">业务报表查询 </div>
            <form action="/count/servers/"  method="post">
                       <fieldset>
                        <legend>报表统计</legend>
                        <th>使用方：<input type="text" name="assets_user" />
                    <!--       <th>业务名称：<input type="text" name="business_name" autocomplete="on" required/> -->
                        <th>IDC类型：<input type="text" name="IDC_type"  /></th>
                        <th>机房：   <input type="text" name="room_info" /></th>
                           <br>
                        <th>业务名称：<input type="text" name="business_name"/></th>
                           <br>
                        <th>上线时间从： <input type="text" name="upline_time0"  value="1970-01-01" required/></th>
                        <th>到： <input type="text" name="upline_time1"   required/></th>

                    <input type="submit" formenctype="multipart/form-data" value="提 交"  />
                        <br>
                     </fieldset>
                    </form>
				<div class="panel-body">
					<table class="table table-striped">
					  <thead>
						<tr>
						<th>使用方</th>
                       <!-- <th>国家/地区</th> -->
                        <th>IDC类型</th>
                         <th>机房</th>
                        <th>业务名称</th>
                        <th>实际服务器使用数</th>
                        <th>上线时间</th>
						</tr>
					  <thead>
					  <tbody>

					  {% if result %}
					  	{% if result['data'] %}
					  		{% for assets_user,IDC_type,room_info,business_name,servers_used,upline_time in result['data'] %}
					  			<tr>
					  			<form id='roomForm' action="/statement/business/servers" method="POST">
								  <td class="warning">{{ assets_user }}</td>
                                  <td>{{ IDC_type }}</td>
                                  <td class="warning">{{ room_info }}</td>
                                  <td class="danger">{{ business_name }}</td>
                                  <td>{{ servers_used }}</td>
                                  <td class="danger">{{ upline_time }}</td>
								</form>
								</tr>
					  		{% endfor %}
					  	{% endif %}
					  {% endif %}

					  </tbody>
					</table>
				</div>
			</div>
		</div>
	</div>
{% endblock %}
